package javajc;

import java.util.Scanner;

public class day04_GuessingWhile {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = (int)(Math.random()*1000+1);
        System.out.println("猜吧");
        int b = scan.nextInt();
        while (b!=a){
            if(b>a){
                System.out.println("猜大了");
            }else{
                System.out.println("猜小了");
            }
            System.out.println("猜吧");
            b = scan.nextInt();
        }
        System.out.println("恭喜你猜对了");
    }
}
